#define _CRT_SECURE_NO_WARNINGS 1
#include"seqlist.h"

void Seqlisttest1()
{
	SL s;
	SeqlistInit(&s);
	SeqlistPushBack(&s, 1);
	SeqlistPushBack(&s, 2); 
	SeqlistPushBack(&s, 3);
	SeqlistPushBack(&s, 4);
	SeqlistPushBack(&s, 5);
	SeqlistPrint(&s);

	SeqlistDestory(&s);
}

void Seqlisttest2()
{
	SL s;
	SeqlistInit(&s);
	SeqlistPushBack(&s, 1);
	SeqlistPushBack(&s, 2);
	SeqlistPushFront(&s, 10);
	SeqlistPushFront(&s, 20);
	SeqlistPushFront(&s, 30);
	SeqlistPrint(&s);


	SeqlistPopBack(&s);
	SeqlistPopBack(&s);
	SeqlistPrint(&s);

	SeqlistPopFront(&s);
	SeqlistPopFront(&s);




	SeqlistPrint(&s);

	SeqlistDestory(&s);
}


void Seqlisttest3()
{
	SL s;
	SeqlistInit(&s);
	SeqlistPushBack(&s, 1);
	SeqlistPushBack(&s, 2);
	SeqlistPushBack(&s, 3);
	SeqlistPushBack(&s, 4);
	SeqlistInsert(&s, 0, 10);
	SeqlistInsert(&s, 1, 20);
	SeqlistPrint(&s);

	SeqlistErase(&s, 0);
	SeqlistPrint(&s);

	SeqlistErase(&s, 4);
	SeqlistPrint(&s);

	SeqlistModify(&s, 0, 100);
	SeqlistPrint(&s);

	int pos=SeqlistSearch(&s, 100);
	SeqlistModify(&s, pos, 1000);
	SeqlistPrint(&s);


	SeqlistDestory(&s);
}
int main()
{
	Seqlisttest3();

	return 0;
}